<ul
  nz-menu
  [nzTheme]="ms.sideTheme"
  nzMode="inline"
  [nzInlineCollapsed]="isCollapsed && !notCollapsed"
  class="first"
>
  <li
    nz-menu-item
    nzMatchRouter
    [routerLink]="os.listUi ? 'unitList/' : 'units/w'"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Workers' : ''"
    (click)="selectLink.emit()"
  >
    <i nz-icon nzType="my:vintage-robot"></i>
    <span>Workers</span>
  </li>

  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    *ngIf="ms.game.resourceManager.unlockedSpaceStations.length > 0"
    [routerLink]="'space'"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Space Stations' : ''"
  >
    <i nz-icon nzType="my:defense-satellite"></i>
    <span>Space Stations</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'lab'"
    *ngIf="ms.game.resourceManager.scientist.unlocked"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Laboratory' : ''"
  >
    <i nz-icon nzType="fa-s:flask"></i>
    <span>Laboratory</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'tech'"
    *ngIf="ms.game.researchManager.unlockedTechnologies.length > 0"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Technologies' : ''"
  >
    <i nz-icon nzType="fa-s:book"></i>
    <span>Technologies</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'tree'"
    *ngIf="ms.game.resourceManager.scientist.unlocked"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Tree' : ''"
  >
    <i nz-icon nzType="fa-s:project-diagram"></i>
    <span>Tree</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'fleet'"
    *ngIf="ms.game.researchManager.researches[0].quantity.gt(0)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Fleet' : ''"
  >
    <i nz-icon nzType="my:strafe"></i>
    <span>Fleet</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'/des'"
    *ngIf="ms.game.researchManager.scout.quantity.gt(0)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Designs' : ''"
  >
    <i nz-icon nzType="fa-s:pencil-ruler"></i>
    <span>Designs</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'/modules'"
    *ngIf="ms.game.researchManager.scout.quantity.gt(0)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Modules' : ''"
  >
    <i nz-icon nzType="fa-s:table"></i>
    <span>Modules</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    routerLink="enemyList"
    *ngIf="
      !ms.game.firstRun || ms.game.researchManager.searching.quantity.gte(1)
    "
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Enemies' : ''"
  >
    <i nz-icon nzType="fa-s:search"></i>
    <span>Enemies</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    routerLink="battle"
    *ngIf="ms.game.researchManager.researches[0].quantity.gt(0)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Battle' : ''"
  >
    <i nz-icon nzType="fa-s:crosshairs"></i>
    <span>Battle</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    routerLink="spells"
    *ngIf="ms.game.researchManager.computingTech.quantity.gt(0)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Spells' : ''"
  >
    <i nz-icon nzType="my:computing"></i>
    <span>Spells</span>
  </li>
  <li
    (click)="selectLink.emit()"
    *ngIf="ms.game.automationUnlocked"
    nz-menu-item
    nzMatchRouter
    routerLink="automation"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Automation' : ''"
  >
    <i nz-icon nzType="sync"></i>
    <span>Automation</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    routerLink="report-list"
    *ngIf="ms.game.researchManager.researches[0].quantity.gt(0)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Reports' : ''"
  >
    <i nz-icon nzType="fa-s:chart-bar"></i>
    <span>Reports</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'noti'"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Notifications' : ''"
  >
    <i nz-icon nzType="notification" nzTheme="outline"></i>
    <span>Notifications</span>
  </li>
  <li
    (click)="selectLink.emit()"
    *ngIf="!ms.game.firstRun || ms.game.enemyManager.maxLevel > 3"
    nz-menu-item
    nzMatchRouter
    routerLink="prestige"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Prestige' : ''"
  >
    <i nz-icon nzType="arrow-up" nzTheme="outline"></i>
    <span>Prestige</span>
  </li>
  <li
    (click)="selectLink.emit()"
    *ngIf="!ms.game.firstRun || ms.game.enemyManager.maxLevel > 3"
    nz-menu-item
    nzMatchRouter
    routerLink="expShop"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Exp Shop' : ''"
  >
    <i nz-icon nzType="shop" nzTheme="fill"></i>
    <span>Exp Shop</span>
  </li>
  <li
    (click)="selectLink.emit()"
    *ngIf="!ms.game.firstRun || ms.game.enemyManager.maxLevel > 8"
    nz-menu-item
    nzMatchRouter
    routerLink="cards"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Cards' : ''"
  >
    <i nz-icon nzType="fa-s:layer-group" nzTheme="fill"></i>
    <span>Cards</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    routerLink="warp"
    *ngIf="!ms.game.firstRun || ms.game.darkMatter.gt(1)"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Warps' : ''"
  >
    <i nz-icon nzType="field-time" nzTheme="outline"></i>
    <span>Warps</span>
  </li>
  <li
    *ngIf="ms.game.achievementManager.showTab"
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    routerLink="ack"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Achievements' : ''"
  >
    <i nz-icon nzType="trophy" nzTheme="outline"></i>
    <span>Achievements</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'options'"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Options' : ''"
  >
    <i nz-icon nzType="setting"></i>
    <span>Options</span>
  </li>
  <li
    (click)="selectLink.emit()"
    nz-menu-item
    nzMatchRouter
    [routerLink]="'info'"
    nz-tooltip
    nzTooltipPlacement="right"
    [nzTooltipTitle]="!mobile && isCollapsed ? 'Info' : ''"
  >
    <i nz-icon nzType="info-circle" nzTheme="outline"></i>
    <span>Info</span>
  </li>

  <!-- <li nz-menu-item nzMatchRouter nz-dropdown [nzDropdownMenu]="buyMenu">
    <i nz-icon nzType="shopping-cart"></i>
    <span>Buy {{ buyString }}</span>
  </li>

  <nz-dropdown-menu #buyMenu="nzDropdownMenu">
    <ul nz-menu nzselectLinkable>
      <li nz-menu-item (click)="setCustomBuy(false, 0.5, 'Half')">Buy Half</li>
      <li nz-menu-item (click)="setCustomBuy(false, 1, 'Max')">Buy Max</li>
      <li nz-menu-item (click)="setCustomBuy(true, 10, '10')">Buy 10</li>
      <li nz-menu-item (click)="setCustomBuy(true, 100, '100')">Buy 100</li>
      <li nz-menu-item (click)="setCustomBuy(true, 1000, '1000')">Buy 1000</li>
    </ul>
  </nz-dropdown-menu> -->
</ul>
